﻿using SUNRPA.CONTROLS.IMPL.util;
using System.Collections.Concurrent;
/// <summary>
/// Excel有Office和Wps目前只支持Office后期加入Wps支持。
/// </summary>
namespace SUNRPA.CONTROLS.IMPL.domain.flowItemParam {
    [Serializable]
    public class CopyPivotTableNParam:BaseParam {
        private string sourceObject = "{excelObject}";
        private string targetObject = "{excelObject}";
        private string sourceNameOrIndex;
        private string targetRow;
        private string targetColumn;
        private string sourceSheet;
        private string targetSheet;
        //0保留原格式、1只复制值
        private int copyType = 0;
        public string SourceNameOrIndex {
            get => sourceNameOrIndex; 
            set { 
                sourceNameOrIndex = value;
                NotifyPropertyChanged("SourceNameOrIndex");
            }  
        }
        public string TargetObject {
            get => targetObject; 
            set { 
                targetObject = value;
                NotifyPropertyChanged("TargetObject");
            }  
        }
        public string SourceObject {
            get => sourceObject; 
            set { 
                sourceObject = value;
                NotifyPropertyChanged("SourceObject");
            }  
        }
        public string TargetRow {
            get => targetRow; 
            set { 
                targetRow = value;
                NotifyPropertyChanged("TargetRow");
            }  
        }

        public string TargetColumn {
            get => targetColumn; 
            set { 
                targetColumn = value;
                NotifyPropertyChanged("TargetColumn");
            }  
        }
        public string SourceSheet {
            get => sourceSheet; 
            set { 
                sourceSheet = value;
                NotifyPropertyChanged("SourceSheet");
            }  
        }
        public string TargetSheet {
            get => targetSheet; 
            set { 
                targetSheet = value;
                NotifyPropertyChanged("TargetSheet");
            }
        }
        public int CopyType {
            get => copyType; 
            set { 
                copyType = value;
                NotifyPropertyChanged("CopyType");
            }  
        }
        public string GetTranslateCopyType() {
            switch(this.copyType) {
                case 0:
                    return "保留原格式";
                case 1:
                    return "只复制值";
                default : return "保留原格式";
            }
        }
    }
}
